﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Examination.Areas.Areas.Controllers
{
    public class AdminController : Controller
    {
        //
        // GET: /Areas/Admin/

        public ActionResult Index()
        {
            return View();
        }
		/// <summary>
		///  登录方法
		/// </summary>
		/// <param name="?"></param>
		/// <returns></returns>
		public ActionResult Login(string name,string pwd)
		{
			if(name=="admin"&&pwd=="123456")
			{
				return Content("<script>alert('登录成功');location.href='/Text/Show'</script>");
			}
			else
			{
				return Content("<script>alert('用户名或密码输入错误');location.href='/Areas/Admin/Index'</script>");
			}
		}

    }
}
